package com.baobao.domain;

import java.io.Serializable;

import javax.persistence.Id;

import javax.persistence.*;

/**
 */
public class CoursePK implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 */
	public CoursePK() {
	}

	/**
	 */

	@Column(name = "banjiId", length = 40, nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public String banjiId;
	/**
	 */

	@Column(name = "weekDay", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public Integer weekDay;
	/**
	 */

	@Column(name = "seqNo", nullable = false)
	@Basic(fetch = FetchType.EAGER)
	@Id
	public Integer seqNo;

	/**
	 */
	public void setBanjiId(String banjiId) {
		this.banjiId = banjiId;
	}

	/**
	 */
	public String getBanjiId() {
		return this.banjiId;
	}

	/**
	 */
	public void setWeekDay(Integer weekDay) {
		this.weekDay = weekDay;
	}

	/**
	 */
	public Integer getWeekDay() {
		return this.weekDay;
	}

	/**
	 */
	public void setSeqNo(Integer seqNo) {
		this.seqNo = seqNo;
	}

	/**
	 */
	public Integer getSeqNo() {
		return this.seqNo;
	}

	/**
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = (int) (prime * result + ((banjiId == null) ? 0 : banjiId.hashCode()));
		result = (int) (prime * result + ((weekDay == null) ? 0 : weekDay.hashCode()));
		result = (int) (prime * result + ((seqNo == null) ? 0 : seqNo.hashCode()));
		return result;
	}

	/**
	 */
	public boolean equals(Object obj) {
		if (obj == this)
			return true;
		if (!(obj instanceof CoursePK))
			return false;
		CoursePK equalCheck = (CoursePK) obj;
		if ((banjiId == null && equalCheck.banjiId != null) || (banjiId != null && equalCheck.banjiId == null))
			return false;
		if (banjiId != null && !banjiId.equals(equalCheck.banjiId))
			return false;
		if ((weekDay == null && equalCheck.weekDay != null) || (weekDay != null && equalCheck.weekDay == null))
			return false;
		if (weekDay != null && !weekDay.equals(equalCheck.weekDay))
			return false;
		if ((seqNo == null && equalCheck.seqNo != null) || (seqNo != null && equalCheck.seqNo == null))
			return false;
		if (seqNo != null && !seqNo.equals(equalCheck.seqNo))
			return false;
		return true;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder("CoursePK");
		sb.append(" banjiId: ").append(getBanjiId());
		sb.append(" weekDay: ").append(getWeekDay());
		sb.append(" seqNo: ").append(getSeqNo());
		return sb.toString();
	}
}
